<?php use_helper('number')?>
<script type="text/javascript">
<!--

//-->

</script>

<fieldset><legend>Addresse</legend>
<?php echo $objDef->renderAttribute($self, 'adresse')?>
<?php echo $objDef->renderAttribute($self, 'codpos')?>
<?php echo $objDef->renderAttribute($self, 'ville')?>
<?php echo $objDef->renderAttribute($self, 'departement')?>
<?php if($self->location_type == 'APPROXIMATE' or $self->location_type == 'GEOMETRIC_CENTER'){
	$htmlAtt = array("style"=>'background-color: red; color: white; font-weight: bold;');
}else{
	$htmlAtt = array();
}?>
<?php echo $objDef->renderAttribute($self, 'location_type', 'div',array(), $htmlAtt)?>
<?php echo $objDef->renderAttribute($self, 'address_type')?>
</fieldset>
<br />
<h1>Liste des clients dans un rayon de <?php echo $distance ?> kms 
<input id="changeDistanceControl" type="text" value="<?php echo $distance ?>"/>
<a href="javascript: refreshClientsView();"> <img src="/images/icons/16/refresh.png" title="<?php echo __('Modifier le rayon'); ?>" ></a>
</h1>
<?php if(isset($query)):?>
		<table>
  <tr>
    <th><?php echo __('Type')?></th>
    <th><?php echo __('Name')?></th>
    <th><?php echo __('Ville')?></th>
    <th><?php echo __('Adresse')?></th>
    <th><?php echo __('Distance (Km)')?></th>
    <th><?php echo __('Encour')?></th>
  </tr>

		<?php while ($item = $query->fetch()) 
		{ ?>
			<tr>
			<td><?php echo client::getIconTag($item['couleur'], $item['category']); ?></td>
			<td><?php echo $item['nom'] ?></td>
			<td><?php echo $item['ville'] ?></td>
			<td><?php echo $item['adresse'] ?></td>
			<td><?php echo round($item['distance'],2); ?></td>
			<td><?php echo format_number($item['encour']) ?></td>
			</tr>		
		<?php }
		?>
</table>
	
<?php endif;?>
<br />

<div id="map_canvas" style="width:950px; height:700px"></div>

<!-- 
<iframe width="950" scrolling="no" height="700" frameborder="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=fr&geocode=&q=<?php echo $self->latitude.','.$self->longitude?>&aq=&&vpsrc=0&ie=UTF8&t=m&z=15&ll=<?php echo $self->latitude.','.$self->longitude?>&output=embed" marginwidth="0" marginheight="0">

</iframe>
 -->